package com.sqlcheck.dto.request;

import com.sqlcheck.common.enums.DatabaseType;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Builder;
import lombok.Data;

import jakarta.validation.constraints.NotBlank;
import jakarta.validation.constraints.NotNull;
import java.util.Map;

@Data
@Builder
@Schema(description = "统一分析请求")
public class UnifiedAnalysisRequest {

    @NotBlank(message = "SQL内容不能为空")
    @Schema(description = "SQL语句内容", example = "SELECT * FROM users WHERE id = 1;", required = true)
    private String sqlContent;

    @NotNull(message = "源数据库类型不能为空")
    @Schema(description = "源数据库类型", example = "ORACLE", required = true)
    private DatabaseType sourceDbType;

    @NotNull(message = "目标数据库类型不能为空")
    @Schema(description = "目标数据库类型", example = "GOLDENDB", required = true)
    private DatabaseType targetDbType;

    @Schema(description = "任务名称，可选", example = "用户表查询兼容性分析")
    private String taskName;

    @Schema(description = "用户ID，用于AI增强分析时的限额控制", example = "1")
    private Long userId;

    @Schema(description = "是否启用AI增强分析", example = "false")
    @Builder.Default
    private boolean aiEnhancementEnabled = false;

    @Schema(description = "分析选项配置")
    private Map<String, Object> analysisOptions;
}